package com.ecloud.gardensterminal.controller;

import com.ecloud.gardensterminal.common.JsonResult;
import com.ecloud.gardensterminal.domain.GardensParalleling;
import com.ecloud.gardensterminal.server.GardensParallelingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Squbi
 */
@RestController
public class GardensParallelingController {
    @Autowired
    private GardensParallelingService parallelingService;

    @GetMapping("/paralleling/newly")
    public JsonResult selectNewly() {
        List<GardensParalleling> gardensParallelings = parallelingService.selectNewly();
        return JsonResult.success(gardensParallelings);
    }
}
